3.2 \(\int (a+b \sec ^2(e+f x)) \sin ^5(e+f x) \, dx\)

Optimal. Leaf size=66 \[ \frac {(2 a-b) \cos ^3(e+f x)}{3 f}-\frac {(a-2 b) \cos (e+f x)}{f}-\frac {a \cos ^5(e+f x)}{5 f}+\frac {b \sec (e+f x)}{f} \]

[Out]

-(a-2*b)*cos(f*x+e)/f+1/3*(2*a-b)*cos(f*x+e)^3/f-1/5*a*cos(f*x+e)^5/f+b*sec(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4133, 448} \[ \frac {(2 a-b) \cos ^3(e+f x)}{3 f}-\frac {(a-2 b) \cos (e+f x)}{f}-\frac {a \cos ^5(e+f x)}{5 f}+\frac {b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^5,x]

[Out]

-(((a - 2*b)*Cos[e + f*x])/f) + ((2*a - b)*Cos[e + f*x]^3)/(3*f) - (a*Cos[e + f*x]^5)/(5*f) + (b*Sec[e + f*x])
/f

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rubi steps

\begin {align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin ^5(e+f x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^2 \left (b+a x^2\right )}{x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (a \left (1-\frac {2 b}{a}\right )+\frac {b}{x^2}-(2 a-b) x^2+a x^4\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {(a-2 b) \cos (e+f x)}{f}+\frac {(2 a-b) \cos ^3(e+f x)}{3 f}-\frac {a \cos ^5(e+f x)}{5 f}+\frac {b \sec (e+f x)}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 88, normalized size = 1.33 \[ -\frac {5 a \cos (e+f x)}{8 f}+\frac {5 a \cos (3 (e+f x))}{48 f}-\frac {a \cos (5 (e+f x))}{80 f}+\frac {7 b \cos (e+f x)}{4 f}-\frac {b \cos (3 (e+f x))}{12 f}+\frac {b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)*Sin[e + f*x]^5,x]

[Out]

(-5*a*Cos[e + f*x])/(8*f) + (7*b*Cos[e + f*x])/(4*f) + (5*a*Cos[3*(e + f*x)])/(48*f) - (b*Cos[3*(e + f*x)])/(1
2*f) - (a*Cos[5*(e + f*x)])/(80*f) + (b*Sec[e + f*x])/f

________________________________________________________________________________________

fricas [A]  time = 0.82, size = 60, normalized size = 0.91 \[ -\frac {3 \, a \cos \left (f x + e\right )^{6} - 5 \, {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{4} + 15 \, {\left (a - 2 \, b\right )} \cos \left (f x + e\right )^{2} - 15 \, b}{15 \, f \cos \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^5,x, algorithm="fricas")

[Out]

-1/15*(3*a*cos(f*x + e)^6 - 5*(2*a - b)*cos(f*x + e)^4 + 15*(a - 2*b)*cos(f*x + e)^2 - 15*b)/(f*cos(f*x + e))

________________________________________________________________________________________

giac [B]  time = 0.50, size = 213, normalized size = 3.23 \[ \frac {2 \, {\left (\frac {15 \, b}{\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1} + \frac {8 \, a - 25 \, b - \frac {40 \, a {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {110 \, b {\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac {80 \, a {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {160 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {90 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {15 \, b {\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}}{{\left (\frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1\right )}^{5}}\right )}}{15 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^5,x, algorithm="giac")

[Out]

2/15*(15*b/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1) + (8*a - 25*b - 40*a*(cos(f*x + e) - 1)/(cos(f*x + e) +
 1) + 110*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 80*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 160*b*(co
s(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 90*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 15*b*(cos(f*x + e) -
 1)^4/(cos(f*x + e) + 1)^4)/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 1)^5)/f

________________________________________________________________________________________

maple [A]  time = 1.10, size = 82, normalized size = 1.24 \[ \frac {-\frac {a \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}+b \left (\frac {\sin ^{6}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)*sin(f*x+e)^5,x)

[Out]

1/f*(-1/5*a*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+b*(sin(f*x+e)^6/cos(f*x+e)+(8/3+sin(f*x+e)^4+4/3*si
n(f*x+e)^2)*cos(f*x+e)))

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 58, normalized size = 0.88 \[ -\frac {3 \, a \cos \left (f x + e\right )^{5} - 5 \, {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{3} + 15 \, {\left (a - 2 \, b\right )} \cos \left (f x + e\right ) - \frac {15 \, b}{\cos \left (f x + e\right )}}{15 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e)^5,x, algorithm="maxima")

[Out]

-1/15*(3*a*cos(f*x + e)^5 - 5*(2*a - b)*cos(f*x + e)^3 + 15*(a - 2*b)*cos(f*x + e) - 15*b/cos(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 4.21, size = 55, normalized size = 0.83 \[ \frac {{\cos \left (e+f\,x\right )}^3\,\left (\frac {2\,a}{3}-\frac {b}{3}\right )-\cos \left (e+f\,x\right )\,\left (a-2\,b\right )-\frac {a\,{\cos \left (e+f\,x\right )}^5}{5}+\frac {b}{\cos \left (e+f\,x\right )}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)^5*(a + b/cos(e + f*x)^2),x)

[Out]

(cos(e + f*x)^3*((2*a)/3 - b/3) - cos(e + f*x)*(a - 2*b) - (a*cos(e + f*x)^5)/5 + b/cos(e + f*x))/f

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)*sin(f*x+e)**5,x)

[Out]

Timed out

________________________________________________________________________________________